package game.ouroboros;

import android.util.Log;
import framework.graphics.opengl.Animation;
import framework.graphics.opengl.GLEngine;
import framework.graphics.opengl.Texture;
import framework.graphics.opengl.TextureRegion;

/**
 * Todos os recursos do jogo(imagens ^ sons) serão referenciados nessa classe 
 * TODO refazer porque ficou muito feio( Usar pattern Singleton
 * @author lucas
 *
 */
public class Assets {
	public static Texture menuBackGround;
	public static Texture gameOver;
	public static Texture botoes;
	
	public static TextureRegion  botaoJogar;///////TODO NOOOOOOOOOOOOOOOOO
	public static TextureRegion botaoVoltar; /////TODO NOOOOOOOOOOOOOOOOO
	public static TextureRegion menuBackGroundRegion;
	public static TextureRegion gameOverRegion;
	public static Animation anim;
	public static Texture background;
	public static Texture inimigos;
	public static TextureRegion backgroundRegion;
	public static TextureRegion engineOver;
	public static TextureRegion pauseMenu;
	public static TextureRegion ready;
	public static TextureRegion pause;
	public static TextureRegion portal;
	
	public static TextureRegion SKIPER;
	public static TextureRegion AIR_SKIPER;
	public static TextureRegion OGRE;
	public static TextureRegion FIRE_OGRE;
	public static TextureRegion DARK_OGRE;
	public static TextureRegion ICE_ARCHER;
	public static TextureRegion FIRE_ARCHER;
	public static TextureRegion CHAMAN;
	public static TextureRegion ARMORED_OGRE;
	public static TextureRegion BOOM;
	public static TextureRegion NIGHTMARE;
	public static TextureRegion DRAGON;
	public static TextureRegion EK_CHUA;
	public static TextureRegion IXTAB;
	public static TextureRegion AHPUCH;
	
	public static TextureRegion ELECTRIC_ARC;
	public static TextureRegion ENERGY_FIELD;
	public static TextureRegion ESTALACTITES;
	public static TextureRegion FLAME_THROWER;
	public static TextureRegion GEISER;
	public static TextureRegion GIANT_BOULDER;
	public static TextureRegion LAVA_DIG;
	public static TextureRegion SPIKE_BARRIER;
	public static TextureRegion TORNADO;
	public static TextureRegion WATER_SHOOTER;
	public static TextureRegion WATER_SLIDE;
	public static TextureRegion WIND_BREAKER;
	public static TextureRegion gameGridRegion;
	public static Texture gameGrid;
		
	/**
	 * Todos os recusos devem ser carregados nesse método
	 * @param game
	 */
	public static void load(GLEngine game){
		Log.v("<Chamada>","Assets.load()");
		menuBackGround = new Texture(game, "background_menu.jpg");
		menuBackGroundRegion = new TextureRegion(menuBackGround, 0, 0, 320, 480);
		background = new Texture(game, "background_game.jpg");
		backgroundRegion = new TextureRegion(background, 0, 0, 320, 480);
		gameOver = new Texture(game, "game_over.jpg");
		gameOverRegion = new TextureRegion(gameOver, 0, 0, 320, 480);
		
		botoes = new Texture(game, "botoes.png");
		
		botaoJogar = new TextureRegion(botoes,0,0,111,111);
		botaoVoltar = new TextureRegion(botoes,111,0,111,111);
		
		
		/**
		 * Sprites 
		 */
		inimigos= new Texture(game, "Pokemon.png");
//		portal  = new TextureRegion(inimigos,716 , 211, 74, 57);
		
		SKIPER= new TextureRegion(inimigos,2036 , 502, 48, 47);
		AIR_SKIPER= new TextureRegion(inimigos, 1242, 292, 100, 62);
		OGRE= new TextureRegion(inimigos, 303, 494, 59, 64);
		FIRE_OGRE= new TextureRegion(inimigos,113 , 684, 63, 59);
		DARK_OGRE= new TextureRegion(inimigos, 2500, 870, 85, 81);
		ICE_ARCHER= new TextureRegion(inimigos,2303 , 1831,90, 84);
		FIRE_ARCHER= new TextureRegion(inimigos, 1445,198, 87, 87);
		CHAMAN= new TextureRegion(inimigos, 1256, 208, 73, 68);
		ARMORED_OGRE= new TextureRegion(inimigos, 1924, 1073, 80, 69);
		BOOM= new TextureRegion(inimigos, 596, 316, 52, 40);
		NIGHTMARE= new TextureRegion(inimigos, 580, 1164, 87, 69);
		DRAGON= new TextureRegion(inimigos, 478, 5, 99, 89);
		EK_CHUA= new TextureRegion(inimigos, 1257, 973, 75, 75);
		IXTAB= new TextureRegion(inimigos, 962, 1157, 88, 88);
		AHPUCH= new TextureRegion(inimigos, 100, 770, 95, 95);
		
		portal = DRAGON;
		
		ELECTRIC_ARC= new TextureRegion(inimigos, 2326, 20, 50, 53);
		ENERGY_FIELD= new TextureRegion(inimigos, 1753, 224, 47, 31);
		ESTALACTITES= new TextureRegion(inimigos, 1071, 222, 66, 34);
		FLAME_THROWER= new TextureRegion(inimigos, 310, 27, 50, 49);
		GEISER= new TextureRegion(inimigos, 594, 25, 58, 46);
		GIANT_BOULDER= new TextureRegion(inimigos, 2500, 871, 85, 80);
		LAVA_DIG= new TextureRegion(inimigos, 29, 600, 48, 48);
		SPIKE_BARRIER= new TextureRegion(inimigos, 500 , 1072, 57, 63);
		TORNADO= new TextureRegion(inimigos, 2605, 195, 60, 48);
		WATER_SHOOTER= new TextureRegion(inimigos, 883, 792, 59, 49);
		WATER_SLIDE= new TextureRegion(inimigos, 2518, 310, 49, 50);
		WIND_BREAKER= new TextureRegion(inimigos, 2794, 207, 70, 64);
		 
		gameGrid = new Texture(game, "grid_background.png");
		gameGridRegion = new TextureRegion(gameGrid, 0, 0, 240, 60);
		
		Log.v("<FIM>","Assets.load()");
	}
	
	
	public static void reload(){
		Log.v("<Chamada>","Assets.reload()");
		menuBackGround.reload();
		gameOver.reload();
		botoes.reload();
		Log.v("<FIM>","Assets.load()");
	}
}
